import {post} from '@/api/Http'


/**
 * 获取github地址信息
 * @param githubAddress github地址
 */
export const requestInfo = (githubAddress: string) => post(
    '/develop/github/info', {githubAddress}
)


/**
 * 获取github的分支信息
 * @param githubAddress github地址
 */
export const requestGetBranch = (githubAddress: string) => post(
    '/develop/github/getBranch', {githubAddress}
)

/**
 * 下载github项目
 * @param githubAddress
 */
export const requestDownload = (githubAddress: string) => post(
    '/develop/github/download', {githubAddress}
)

/**
 * 下载github项目(不带.git目录)
 * @param githubAddress
 * @param branchName
 */
export const requestDownloadZip = (githubAddress: string,branchName?:string) => post(
    '/develop/github/downloadZip', {githubAddress,branchName}
)
